package com.bluejie.bluej.logUtil;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogUtil {
    public static void main(String[] args) {
        Logger logger = LoggerFactory.getLogger(LogUtil.class);
        boolean flag= false;

        String name = "123";
        String value = "abc";
        logger.info("--info--china--中国--");
        logger.error("--error--china--中国--");
        logger.error("{}{}",name,value);

        while (flag){
            try {
                Thread.sleep(2000);
                logger.info("--info--china--中国--");
                logger.error("--error--china--中国--");
                logger.info("--thread go on now !--");
            } catch (InterruptedException e) {
                logger.error("thread sleep error",e);
            }
        }
    }

    public static Logger instance(Class cls){
        return  LoggerFactory.getLogger(cls);
    }
}
